#ifndef _PVU_SHADOW_H_
#define _PVU_SHADOW_H_

class	ImageCache;
#include "ui/ui_sprite.h"
#include "graphics/color.h"
// contains the shadowmap for 
class	PVUShadow
{
public:
	PVUShadow();		// treat it as a singleton instead, so we don't keep getting/loosing the surface?
	~PVUShadow();
	bool 				Init(int	Width = 512, int Height = 512, int	Depth = 32);
	bool				StartCache();
	bool				EndCache();
	bool				ShowCache();
	void				SetColor(COLOR c) { m_ShadowColor = c; };

	void				CreateOverlay(int w, int h, const std::string& Base);
	void				RenderOverlay(const math::Vec2& Offset, float Scale);
protected:
	ImageCache*			m_pCache;
	COLOR				m_ShadowColor;


	// shadow overlay
	ui::UISprite*		m_OverlayA;
	int					m_OverlayX, m_OverlayY;
};

#endif //_PVU_SHADOW_H_